home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / maksiu / lists / amoslist-1295.lzh / AMOSLIST / 000105_amos-request@svcs1.digex.net_Sat Dec 16 12:05:48 1995.msg < prev    next >
Internet Message Format  |  1995-12-31  |  3KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id MAA04170;  for <mcox@access.digex.net> ; Sat, 16 Dec 1995 12:05:46 -0500
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id JAA03689 for amos-out; Sat, 16 Dec 1995 09:22:33 -0500
  3. Received: from mail1.access.digex.net (mail1.access.digex.net [205.197.247.2]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id JAA03686 for <amos-list@svcs1.digex.net>; Sat, 16 Dec 1995 09:22:31 -0500
  4. Received: from agora.stm.it (agora.stm.it [194.20.43.1]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id JAA23990;  for <amos-list@access.digex.net> ; Sat, 16 Dec 1995 09:22:19 -0500
  5. From: M.Berionne@agora.stm.it
  6. Received: (from root@localhost) by agora.stm.it (8.6.8.1/8.6.6) id PAA20558; Sat, 16 Dec 1995 15:23:20 GMT
  7. Message-Id: <199512161523.PAA20558@agora.stm.it>
  8. To: amos-list@access.digex.net
  9. Subject: Image processing
  10. Date: Sat,  16 Dec 95 15:20:5 GMT
  11. Status: RO
  12. X-Status: 
  13.  
  14.  
  15.  
  16. Hello guy,
  17.  
  18.  > However I don't know how to separate and pull a 0 to 16 value from
  19.  > the "F" and the "G" and the "3" of the "FG3" string. This is not the
  20.  > sort of programming at which I am good. I just need the line of code
  21.  > to get these 3 values, average them, set a minimum threshold to kill
  22.  > the pixel to zero, and then I'll run the procedure about 1,200,000
  23.  > times to process each pixel in my 70 frame animation.
  24.  
  25. Well, to be honest: DO YOU KNOW ANYTHING ABOUT HEX NUMBER???
  26.  
  27. You ask about a possible "FG3" string that should be the colour of a point.
  28. But the hex numbers go FROM 0 (zero) up TO F and F means 15. So, you have:
  29. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12 and so on.
  30. But 11 will NOT mean eleven, but it stands for the normal 17. Is it clear??
  31.  
  32. Now, the Point(,) function does not return a string, but a number. You can
  33. display it such as a string, using the hex$() function, but it still remain
  34.  
  35. a
  36. number.
  37.  
  38. It's better to display it in hex, since in this way you can "think" that
  39. each
  40. part of the number is a component of the colour. $4F6 means that the RED
  41. level is 4, the GREEN one is F (=15) and the BLU one is 6: this is why it's
  42. called RGB.
  43.  
  44. Now, to know the value of each component, you can do:
  45. R=Point(x,y)/256
  46. G=(Point(x,y)/16)-(R*16)
  47. B=Point(x,y)-(R*256)-(G*16)
  48.  
  49. Is it clear??
  50.  
  51. But if you own Craft extension look for a special command about all it.
  52.  
  53. Bye.
  54.  
  55.       _____________________________________________________________
  56.       |   \ | /   Michele Berionne             Not tonight dear,  |
  57.       |    \|/                                 I have a modem!!   |
  58.       |   --*--   M.Berionne@agora.stm.it                         |
  59.       |    /|\                                 Don't panic!!      |
  60.       |   / | \                                                   |
  61.       | BASIC programmers never die, they GOSUB and don't RETURN. |
  62.       |-----------------------------------------------------------|
  63.       *            On AMINET:                                     *
  64.       * game/shoot/fantasy.lha         game/think/atoms.lha       *
  65.       * game/shoot/in_the_target.lha   game/think/navalbattle.lha *
  66.       *                                                           *
  67.       */\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*
  68.  
  69.  
  70.  
  71.